<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace App\Constants;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

#[Constants]
class ErrorCode extends AbstractConstants {
    /**
     * @Message("操作成功！")
     */
    public const SUCCESS = 1;
    public const INVALID = -1;
    public const DB_SAVE_ERROR = -2;
    public const DB_READ_ERROR = -3;
    public const CACHE_SAVE_ERROR = -4;
    public const CACHE_READ_ERROR = -5;
    public const FILE_SAVE_ERROR = -6;
    public const LOGIN_ERROR = -7;
    public const NOT_EXISTS = -8;
    public const JSON_PARSE_FAIL = -9;
    public const TYPE_ERROR = -10;
    public const NUMBER_MATCH_ERROR = -11;
    public const EMPTY_PARAMS = -12;
    public const DATA_EXISTS = -13;
    public const AUTH_ERROR = -14;

    public const OTHER_LOGIN = -16;
    public const VERSION_INVALID = -17;

    public const CURL_ERROR = -18;

    public const RECORD_NOT_FOUND = -19; // 记录未找到
    public const DELETE_FAILED = -20; // 删除失败
    public const ADD_FAILED = -21; // 添加记录失败
    public const UPDATE_FAILED = -22; // 添加记录失败

    public const DEVICE_DIFF         = -991; // 换设备重新登陆
    public const SMS_CODE_TIME_LIMIT = -994; // 短信验证码发送时间限制
    public const PARAM_INVALID = -995; // 参数无效
    public const ACCESS_TOKEN_TIMEOUT = -996;
    public const SESSION_TIMEOUT = -997;
    public const UNKNOWN = -998;
    public const EXCEPTION = -999;
}
